
*********************************************
****   Description   ************************
*********************************************

*This program computes summary stats for the advertising content measures across our bank advertising sample, generating "Table 6. Advertising Articles - Word Lists Summary Statistics." 

 

*********************************************
****   Table  *******************************
*********************************************
use "$Data/Advertising_BagofWords_December2024.dta", clear

tab FSB
gen fsb_sort = -FSB
replace front_page = front_page*100


* Across advertisements   
eststo clear
order  morality_pos_dummy morality_neg_dummy govtguar_dummy safe_dummy prosperity_dummy feelings_dummy positive_dummy   
estpost tabstat  morality_pos_dummy morality_neg_dummy govtguar_dummy safe_dummy prosperity_dummy  feelings_dummy positive_dummy, statistics(mean) columns(statistics) by(FSB)

* t-test
eststo clear
eststo: estpost ttest morality_pos_dummy morality_neg_dummy govtguar_dummy safe_dummy prosperity_dummy   feelings_dummy positive_dummy, by(fsb_sort) unequal



* Within advertisements  
eststo clear

estpost tabstat morality_pos_tfidf morality_neg_tfidf govtguar_tfidf safe_tfidf prosperity_tfidf feelings_tfidf positive_tfidf , statistics(mean) columns(statistics) by(FSB)
* t-test
eststo clear
eststo: estpost ttest morality_pos_tfidf morality_neg_tfidf govtguar_tfidf safe_tfidf prosperity_tfidf feelings_tfidf positive_tfidf , by(fsb_sort) unequal

 
 
*********************************************
****   ML Table  *******************************
*********************************************
* Cosine similarity measure 
use "$Data/Advertising_ML_Roberta_December2024.dta", clear 
gen fsb_sort = -FSB

eststo clear
order  cosine_morality_pos cosine_morality_neg cosine_govtguar cosine_safe cosine_prosperity  cosine_feelings cosine_positive
estpost tabstat  cosine_morality_pos cosine_morality_neg cosine_govtguar cosine_safe cosine_prosperity  cosine_feelings cosine_positive, statistics(mean) columns(statistics) by(FSB)

* t-test
eststo clear
eststo: estpost ttest cosine_morality_pos cosine_morality_neg cosine_govtguar cosine_safe cosine_prosperity   cosine_feelings cosine_positive, by(fsb_sort) unequal
